<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">

<div th:fragment="common">
    <script th:inline="javascript" type="text/javascript">
        var ctxPath  = [[@{/}]];
        var basePath=[[${#httpServletRequest.getContextPath()}]];
    </script>

</div>

</html>